package com.zhuanzhuan.hero.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bj58.zhuanzhuan.zzentry.common.service.entity.ServiceHeaderEntity;
import com.zhuanzhuan.hero.user.entity.HeroUserInfo;
import com.zhuanzhuan.hero.user.mq.dto.MemberEventMsg;
import com.zhuanzhuan.hero.user.pojo.bo.QueryUserInfoParam;
import com.zhuanzhuan.hero.user.pojo.po.UserPO;
import com.zhuanzhuan.hero.user.vo.UserRealPersonAuthInfoVO;

import java.util.List;

/**
 * dal Interface:HeroUserInfo
 * @author hanjunjun
 * @date 2024-6-17
 */
public interface HeroUserInfoService extends IService<HeroUserInfo> {

    /**
     * 根据uid 查询生效中的
     *
     * @param uid
     * @return com.zhuanzhuan.hero.user.entity.HeroUserInfo
     * @author  hanjunjun
     * @date 2024/6/17
     **/
    HeroUserInfo getUserByUid(Long uid);

    List<HeroUserInfo> listByUid(List<Long> uids);

    List<UserPO> listByParam(QueryUserInfoParam param);

    /**
     * 根据uid更新
     *
     * @param uid
     * @param heroUserInfoUpdate  更新不为空的字段
     * @return void
     * @author  hanjunjun
     * @date 2024/6/25
     **/
    void updateByUid(Long uid, HeroUserInfo heroUserInfoUpdate);

    HeroUserInfo getByPrimaryKey(Long key);

    Long insertSelective(HeroUserInfo record);

    Integer updateByPrimaryKey(HeroUserInfo record);

    /**
     * 根据uid查询用户实人信息下所有的实人姓名、手机号
     *
     * @param uid
     * @return java.util.List<com.zhuanzhuan.hero.user.vo.UserRealPersonAuthInfoVO>
     * @author  hanjunjun
     * @date 2024/7/9
     **/
    List<UserRealPersonAuthInfoVO> queryAllRealPersonAuthUserInfo(Long uid);

    /**
     * 判断是否可编辑，不可编辑则抛出异常
     * @param uid
     * @return void
     * @author  hanjunjun
     * @date 2024/7/11
     **/
    void checkCanEdit(Long uid);

    /**
     * 基本信息是否已完善
     *
     * @param uid
     * @param userInfo
     * @return boolean
     * @author  hanjunjun
     * @date 2024/7/11
     **/
    boolean baseInfoIsPerfection(Long uid, HeroUserInfo userInfo);

    /**
     * 注销
     *
     * @param uid
     * @return boolean
     * @author  hanjunjun
     * @date 2024/7/13
     **/
    boolean unregistUser(Long uid);

    /**
     * 是否需要隐藏会员等级
     *
     * @param header
     * @return java.lang.Boolean
     * @author  hanjunjun
     * @date 2024/7/13
     **/
    boolean needHideMemberLevel(ServiceHeaderEntity header);

    /**
     * 更新会员信息
     *
     * @param body
     * @return boolean
     * @author  hanjunjun
     * @date 2024/7/13
     **/
    boolean updateMemberInfo(MemberEventMsg body);
}